
    /**  
    * @Title: SingleTableSelect.java
    * @Package com.frames.table.single.operate
    * @Description: 
    * @author likai
    * @date 2018年12月6日
    * @version V1.0  
    */
    
package com.frames.table.single.operate;

import lombok.Data;

/**
    * @ClassName: SingleTableSelect
    * @Description: 表查询字段
    * @author likai
    * @date 2018年12月6日
    *
    */
@Data
public class SingleTableSelect {
	private String selectCols="";//选择列
	public SingleTableSelect(String alias, String selectCols) {
		super();
		//alias别名
		String[] cols=selectCols.split(",");
		for (int i = 0; i < cols.length; i++) {
			if (!"".equals(alias.trim())) {				
				this.selectCols+=","+alias+"."+cols[i].trim();
			}else {
				this.selectCols+=","+cols[i].trim();
			}
		}
		this.selectCols=this.selectCols.replaceFirst(",", "");
	}
	public SingleTableSelect(String selectCols) {
		super();
		this.selectCols = selectCols;
	}	
	public SingleTableSelect() {
		super();
		this.selectCols="*";
	}
	
}
